/*
 * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
 * Copyright (c) 1993 Ulrich Pegelow <pegelow@moorea.uni-muenster.de>
 * Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
 * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
 * Copyright (C) 1998-2001 Wichert Akkerman <wakkerma@deephackmode.org>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// flag bit 7 is set 0, as const char*;
// flag bit 7 is set 1, as void*, size indicate in next-arg;
unsigned char syscall_param_flags[] = {
0, 6, //osf_syscall=0
0, 1, //exit=1
0, 0, //fork=2
0x82, 3, //read=3
0x82, 3, //write=4
0, 5, //osf_old_open=5
0, 1, //close=6
0, 4, //osf_wait4=7
0, 5, //osf_old_creat=8
3, 2, //link=9
1, 1, //unlink=10
0, 5, //osf_execve=11
1, 1, //chdir=12
0, 1, //fchdir=13
1, 3, //mknod=14
1, 2, //chmod=15
1, 3, //chown=16
0, 1, //brk=17
0, 5, //osf_getfsstat=18
0, 3, //lseek=19
0, 0, //getxpid=20
0, 4, //osf_mount=21
0, 2, //umount=22
0, 1, //setuid=23
0, 0, //getxuid=24
0, 5, //exec_with_loader=25
0, 4, //ptrace=26
0, 5, //osf_nrecvmsg=27
0, 5, //osf_nsendmsg=28
0, 5, //osf_nrecvfrom=29
0, 5, //osf_naccept=30
0, 5, //osf_ngetpeername=31
0, 5, //osf_ngetsockname=32
1, 2, //access=33
0, 5, //osf_chflags=34
0, 5, //osf_fchflags=35
0, 0, //sync=36
0, 2, //kill=37
0, 5, //osf_old_stat=38
0, 2, //setpgid=39
0, 5, //osf_old_lstat=40
0, 1, //dup=41
0, 0, //pipe=42
0, 4, //osf_set_program_attributes=43
0, 5, //osf_profil=44
1, 3, //open=45
0, 5, //osf_old_sigaction=46
0, 1, //getxgid=47
0, 2, //osf_sigprocmask=48
0, 5, //osf_getlogin=49
0, 5, //osf_setlogin=50
1, 1, //acct=51
0, 1, //sigpending=52
0, 0, //=53
0, 3, //ioctl=54
0, 5, //osf_reboot=55
0, 5, //osf_revoke=56
3, 2, //symlink=57
1, 3, //readlink=58
1, 3, //execve=59
0, 1, //umask=60
1, 1, //chroot=61
0, 5, //osf_old_fstat=62
0, 0, //getpgrp=63
0, 0, //getpagesize=64
0, 5, //osf_mremap=65
0, 0, //vfork=66
1, 2, //stat=67
1, 2, //lstat=68
0, 5, //osf_sbrk=69
0, 5, //osf_sstk=70
0, 6, //mmap=71
0, 5, //osf_old_vadvise=72
0, 2, //munmap=73
0, 3, //mprotect=74
0, 3, //madvise=75
0, 0, //vhangup=76
0, 5, //osf_kmodcall=77
0, 5, //osf_mincore=78
0, 2, //getgroups=79
0, 2, //setgroups=80
0, 5, //osf_old_getpgrp=81
0, 2, //setpgrp=82
0, 3, //osf_setitimer=83
0, 5, //osf_old_wait=84
0, 5, //osf_table=85
0, 2, //osf_getitimer=86
0, 2, //gethostname=87
1, 2, //sethostname=88
0, 0, //getdtablesize=89
0, 2, //dup2=90
0, 2, //fstat=91
0, 3, //fcntl=92
0, 5, //osf_select=93
0, 3, //poll=94
0, 1, //fsync=95
0, 3, //setpriority=96
0, 3, //socket=97
0, 3, //connect=98
0, 3, //accept=99
0, 2, //getpriority=100
0, 4, //send=101
0, 4, //recv=102
0, 0, //sigreturn=103
0, 3, //bind=104
0, 5, //setsockopt=105
0, 2, //listen=106
0, 5, //osf_plock=107
0, 5, //osf_old_sigvec=108
0, 5, //osf_old_sigblock=109
0, 5, //osf_old_sigsetmask=110
0, 3, //sigsuspend=111
0, 2, //osf_sigstack=112
0, 3, //recvmsg=113
0, 3, //sendmsg=114
0, 5, //osf_old_vtrace=115
0, 2, //osf_gettimeofday=116
0, 2, //osf_getrusage=117
0, 5, //getsockopt=118
0, 0, //119
0, 3, //readv=120
0, 3, //writev=121
0, 2, //osf_settimeofday=122
0, 3, //fchown=123
0, 2, //fchmod=124
0x82, 6, //recvfrom=125
0, 2, //setreuid=126
0, 2, //setregid=127
3, 2, //rename=128
1, 2, //truncate=129
0, 2, //ftruncate=130
0, 2, //flock=131
0, 1, //setgid=132
0x82, 6, //sendto=133
0, 2, //shutdown=134
0, 4, //socketpair=135
1, 2, //mkdir=136
1, 1, //rmdir=137
0, 2, //osf_utimes=138
0, 5, //osf_old_sigreturn=139
0, 5, //osf_adjtime=140
0, 3, //getpeername=141
0, 5, //osf_gethostid=142
0, 5, //osf_sethostid=143
0, 2, //getrlimit=144
0, 2, //setrlimit=145
0, 5, //osf_old_killpg=146
0, 0, //setsid=147
2, 4, //quotactl=148
0, 5, //osf_oldquota=149
0, 3, //getsockname=150
0, 0, //151
0, 0, //152
0, 5, //osf_pid_block=153
0, 5, //osf_pid_unblock=154
0, 0, //155
0, 3, //sigaction=156
0, 5, //osf_sigwaitprim=157
0, 5, //osf_nfssvc=158
0, 4, //osf_getdirentries=159
0, 3, //osf_statfs=160
0, 3, //osf_fstatfs=161
0, 0, //162
0, 5, //osf_asynch_daemon=163
0, 5, //osf_getfh=164
0, 2, //osf_getdomainname=165
1, 2, //setdomainname=166
0, 0, //167
0, 0, //168
0, 5, //osf_exportfs=169
0, 0, //170
0, 0, //171
0, 0, //172
0, 0, //173
0, 0, //174
0, 0, //175
0, 0, //176
0, 0, //177
0, 0, //178
0, 0, //179
0, 0, //180
0, 5, //osf_alt_plock=181
0, 0, //182
0, 0, //183
0, 5, //osf_getmnt=184
0, 0, //185
0, 0, //186
0, 5, //osf_alt_sigpending=187
0, 5, //osf_alt_setsid=188
0, 0, //189
0, 0, //190
0, 0, //191
0, 0, //192
0, 0, //193
0, 0, //194
0, 0, //195
0, 0, //196
0, 0, //197
0, 0, //198
0, 4, //osf_swapon=199
0, 3, //msgctl=200
0, 2, //msgget=201
0, 5, //msgrcv=202
0, 4, //msgsnd=203
0, 4, //semctl=204
0, 3, //semget=205
0, 3, //semop=206
0, 1, //osf_utsname=207
1, 3, //lchown=208
0, 3, //osf_shmat=209
0, 3, //shmctl=210
0, 1, //shmdt=211
0, 3, //shmget=212
0, 5, //osf_mvalid=213
0, 5, //osf_getaddressconf=214
0, 5, //osf_msleep=215
0, 5, //osf_mwakeup=216
0, 3, //msync=217
0, 5, //osf_signal=218
0, 5, //osf_utc_gettime=219
0, 5, //osf_utc_adjtime=220
0, 0, //221
0, 5, //osf_security=222
0, 5, //osf_kloadcall=223
0, 5, //osf_stat=224
0, 5, //osf_lstat=225
0, 5, //osf_fstat=226
0, 3, //osf_statfs64=227
0, 3, //osf_fstatfs64=228
0, 0, //229
0, 0, //230
0, 0, //231
0, 0, //232
0, 1, //getpgid=233
0, 1, //getsid=234
0, 2, //sigaltstack=235
0, 5, //osf_waitid=236
0, 5, //osf_priocntlset=237
0, 5, //osf_sigsendset=238
0, 5, //osf_set_speculative=239
0, 5, //osf_msfs_syscall=240
0, 5, //osf_sysinfo=241
0, 5, //osf_uadmin=242
0, 5, //osf_fuser=243
0, 2, //osf_proplist_syscall=244
0, 5, //osf_ntp_adjtime=245
0, 5, //osf_ntp_gettime=246
0, 5, //osf_pathconf=247
0, 5, //osf_fpathconf=248
0, 0, //249
0, 5, //osf_uswitch=250
0, 2, //osf_usleep_thread=251
0, 5, //osf_audcntl=252
0, 5, //osf_audgen=253
0, 3, //sysfs=254
0, 5, //osf_subsys_info=255
0, 5, //osf_getsysinfo=256
0, 5, //osf_setsysinfo=257
0, 5, //osf_afs_syscall=258
0, 5, //osf_swapctl=259
0, 5, //osf_memcntl=260
0, 5, //osf_fdatasync=261
0, 0, //262
0, 0, //263
0, 0, //264
0, 0, //265
0, 0, //266
0, 0, //267
0, 0, //268
0, 0, //269
0, 0, //270
0, 0, //271
0, 0, //272
0, 0, //273
0, 0, //274
0, 0, //275
0, 0, //276
0, 0, //277
0, 0, //278
0, 0, //279
0, 0, //280
0, 0, //281
0, 0, //282
0, 0, //283
0, 0, //284
0, 0, //285
0, 0, //286
0, 0, //287
0, 0, //288
0, 0, //289
0, 0, //290
0, 0, //291
0, 0, //292
0, 0, //293
0, 0, //294
0, 0, //295
0, 0, //296
0, 0, //297
0, 0, //298
0, 0, //299
0, 2, //bdflush=300
0, 3, //sethae=301
7, 5, //mount=302
0, 1, //old_adjtimex=303
1, 1, //swapoff=304
0, 3, //getdents=305
1, 2, //create_module=306
4, 3, //init_module=307
1, 2, //delete_module=308
0, 1, //get_kernel_syms=309
0, 3, //syslog=310
0, 4, //reboot=311
0, 5, //clone=312
1, 1, //uselib=313
0, 2, //mlock=314
0, 2, //munlock=315
0, 1, //mlockall=316
0, 0, //munlockall=317
0, 1, //sysinfo=318
0, 1, //_sysctl=319
0, 0, //320
0, 1, //oldumount=321
1, 2, //swapon=322
0, 1, //times=323
0, 1, //personality=324
0, 1, //setfsuid=325
0, 1, //setfsgid=326
0, 2, //ustat=327
1, 2, //statfs=328
0, 2, //fstatfs=329
0, 2, //sched_setparam=330
0, 2, //sched_getparam=331
0, 3, //sched_setscheduler=332
0, 1, //sched_getscheduler=333
0, 0, //sched_yield=334
0, 1, //sched_get_priority_max=335
0, 1, //sched_get_priority_min=336
0, 2, //sched_rr_get_interval=337
0, 5, //afs_syscall=338
0, 1, //uname=339
0, 2, //nanosleep=340
0, 5, //mremap=341
0, 3, //nfsservctl=342
0, 3, //setresuid=343
0, 3, //getresuid=344
0, 0, //=345
0, 5, //pciconfig_write=346
1, 5, //query_module=347
0, 5, //prctl=348
0x82, 4, //pread64=349
0x82, 4, //pwrite64=350
0, 0, //rt_sigreturn=351
0, 5, //rt_sigaction=352
0, 4, //rt_sigprocmask=353
0, 2, //rt_sigpending=354
0, 4, //rt_sigtimedwait=355
0, 3, //rt_sigqueueinfo=356
0, 2, //rt_sigsuspend=357
0, 5, //select=358
0, 2, //gettimeofday=359
0, 2, //settimeofday=360
0, 2, //getitimer=361
0, 3, //setitimer=362
1, 2, //utimes=363
0, 2, //getrusage=364
0, 4, //wait4=365
0, 1, //adjtimex=366
0, 2, //getcwd=367
0, 2, //capget=368
0, 2, //capset=369
0, 4, //sendfile=370
0, 3, //setresgid=371
0, 3, //getresgid=372
0, 4, //dipc=373
3, 2, //pivot_root=374
0, 3, //mincore=375
0, 3, //pciconfig_iobase=376
0, 3, //getdents64=377
0, 0, //gettid=378
0, 3, //readahead=379
0, 0, //380
0, 2, //tkill=381
3, 5, //setxattr=382
3, 5, //lsetxattr=383
2, 5, //fsetxattr=384
3, 4, //getxattr=385
3, 4, //lgetxattr=386
2, 4, //fgetxattr=387
1, 3, //listxattr=388
1, 3, //llistxattr=389
0, 3, //flistxattr=390
3, 2, //removexattr=391
3, 2, //lremovexattr=392
2, 2, //fremovexattr=393
0, 6, //futex=394
0, 3, //sched_setaffinity=395
0, 3, //sched_getaffinity=396
0, 5, //tuxcall=397
0, 2, //io_setup=398
0, 1, //io_destroy=399
0, 5, //io_getevents=400
0, 3, //io_submit=401
0, 3, //io_cancel=402
0, 0, //403
0, 0, //404
0, 1, //exit_group=405
0, 3, //lookup_dcookie=406
0, 1, //epoll_create=407
0, 4, //epoll_ctl=408
0, 4, //epoll_wait=409
0, 5, //remap_file_pages=410
0, 1, //set_tid_address=411
0, 0, //restart_syscall=412
0, 4, //fadvise64=413
0, 3, //timer_create=414
0, 4, //timer_settime=415
0, 2, //timer_gettime=416
0, 1, //timer_getoverrun=417
0, 1, //timer_delete=418
0, 2, //clock_settime=419
0, 2, //clock_gettime=420
0, 2, //clock_getres=421
0, 4, //clock_nanosleep=422
0, 4, //semtimedop=423
0, 3, //tgkill=424
0, 2, //stat64=425
0, 2, //lstat64=426
0, 2, //fstat64=427
0, 5, //vserver=428
0, 6, //mbind=429
0, 5, //get_mempolicy=430
0, 3, //set_mempolicy=431
1, 4, //mq_open=432
1, 1, //mq_unlink=433
2, 5, //mq_timedsend=434
0, 5, //mq_timedreceive=435
0, 2, //mq_notify=436
0, 3, //mq_getsetattr=437
0, 5, //waitid=438
3, 5, //add_key=439
7, 4, //request_key=440
0, 5, //keyctl=441
0, 3, //ioprio_set=442
0, 2, //ioprio_get=443
0, 0, //inotify_init=444
2, 3, //inotify_add_watch=445
0, 2, //inotify_rm_watch=446
0, 1, //fdatasync=447
0, 4, //kexec_load=448
0, 4, //migrate_pages=449
2, 4, //openat=450
2, 3, //mkdirat=451
2, 4, //mknodat=452
2, 5, //fchownat=453
2, 3, //futimesat=454
0, 4, //fstatat64=455
2, 3, //unlinkat=456
10, 4, //renameat=457
10, 5, //linkat=458
5, 3, //symlinkat=459
2, 4, //readlinkat=460
2, 4, //fchmodat=461
2, 4, //faccessat=462
0, 6, //pselect6=463
0, 5, //ppoll=464
0, 1, //unshare=465
0, 2, //set_robust_list=466
0, 3, //get_robust_list=467
0, 6, //splice=468
0, 4, //sync_file_range=469
0, 4, //tee=470
0, 4, //vmsplice=471
0, 6, //move_pages=472
0, 3, //getcpu=473
0, 6, //epoll_pwait=474
2, 4, //utimensat=475
0, 3, //signalfd=476
0, 4, //timerfd=477
0, 1, //eventfd=478
0, 5, //recvmmsg=479
0, 4, //fallocate=480
0, 2, //timerfd_create=481
0, 4, //timerfd_settime=482
0, 2, //timerfd_gettime=483
0, 4, //signalfd4=484
0, 2, //eventfd2=485
0, 1, //epoll_create1=486
0, 3, //dup3=487
0, 2, //pipe2=488
0, 1, //inotify_init1=489
0, 4, //preadv=490
0, 4, //pwritev=491
0, 4, //rt_tgsigqueueinfo=492
0, 5, //perf_event_open=493
0, 2, //fanotify_init=494
16, 5, //fanotify_mark=495
0, 4, //prlimit64=496
2, 5, //name_to_handle_at=497
0, 3, //open_by_handle_at=498
0, 2, //clock_adjtime=499
0, 1, //syncfs=500
0, 2, //setns=501
0, 4, //accept4=502
0, 4, //sendmmsg=503
0, 6, //process_vm_readv=504
0, 6, //process_vm_writev=505
0, 5, //kcmp=506
2, 3, //finit_module=507
0, 3, //sched_setattr=508
0, 4, //sched_getattr=509
10, 5, //renameat2=510
0, 3, //getrandom=511
0, 2, //memfd_create=512
2, 5, //execveat=513
};
